<?php

/**
 * This is the model metadata class for table "travel_build_rule".
 */
class TravelBuildRuleMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'travel_build_rule';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('goods_id, end_type, by_day', 'numerical', 'integerOnly'=>true),
			array('build_type', 'length', 'max'=>50),
			array('start_time, end_time, by_week, by_date', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, goods_id, start_time, end_time, build_type, end_type, by_week, by_day, by_date', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'goods_id' => 'Goods',
			'start_time' => 'Start Time',
			'end_time' => 'End Time',
			'build_type' => 'Build Type',
			'end_type' => 'End Type',
			'by_week' => 'By Week',
			'by_day' => 'By Day',
			'by_date' => 'By Date',
		);
	}
}